package com.service.impl;

import com.mapper.ClubMemberMapper;
import com.service.ClubMemberService;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 社团成员信息管理 Service 实现类
 * </p>
 * @author 34448
 */
@Service
public class ClubMemberServiceImpl implements ClubMemberService {

    @Autowired
    private ClubMemberMapper clubMemberMapper;

    @Override
    public List<Map<String, Object>> countClubMembersByYear(Integer year) {
        if (year == null || year <= 0) {
            throw new IllegalArgumentException("年份参数无效");
        }
        return clubMemberMapper.countClubMembersByYear(year);
    }

    @Override
    public List<Map<String, Object>> countClubMembersAllYears() {
        return clubMemberMapper.countClubMembersAllYears();
    }
}